package ModelTest;

import java.util.ArrayList;

public class Types {
	//0 <-> Double, 1 <-> String, 2 <-> Date
	public Types(){
		nameList.add("DATE");
		typeNumberList.add(2);
	}
	
	public void addTypes(String name, int typeNumber){
		nameList.add(name);
		typeNumberList.add(typeNumber);
	}
	
	static public int getTypeNumber(String name){
		if(nameList.indexOf(name) != -1){
			return typeNumberList.get(nameList.indexOf(name));
		}
		else {
			return 0;
		}
	}
	
	static public int getIndex(String name){
		return Types.nameList.indexOf(name) - 1;
	}
	
	static private ArrayList<String> nameList = new ArrayList<String>();
	static private ArrayList<Integer> typeNumberList = new ArrayList<Integer>();
}
